package com.qfedu.knowledge.entity.enums;

/**
 * @ClassName ResultEnum
 * 异常结果
 * @Author ykx
 * @Date 2024/1/9 9:48
 * @Version 1.0
 */
public enum ResultEnum {

    SUCCESS(200, "服务调用成功"),
    FAILED(500, "系统异常，请联系管理员"),
    ANSWER_NULL(10001, "选项为空时，答案不能为空"),
    ANSWER_OPTION_NULL(10002, "选项不为空时，答案选项不能为空"),
    QUESTION_NULL(10003, "题目不存在"),
    KAPTCHA_EXPIRE(10004, "验证码已失效"),
    LENGTH_ERROR(10005, "字典值与字典名长度不一致，请检查"),
    KAPTCHA_ERROR(10006, "验证码错误"),
    ;
    /**
     * 错误码
     */
    private Integer code;

    /**
     * 异常消息
     */
    private String msg;


    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Integer getCode() {
        return code;
    }


    public String getMsg() {
        return msg;
    }
}
